<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
<h2></h2>
<script>
    // try catch 可以将最内层抛出的错误，层层传递到最外层
    try {
        try {
            try {
                console.log(a)
            } catch (e) {
                throw new Error(`${e} line 16`)
            }
        } catch (e) {
            throw new Error(`${e} line 19`)
        }
    } catch (e) {
        throw new Error(`${e} line 21`) // Uncaught Error: Error: Error: ReferenceError: a is not defined line 16 line 19 line 21
    }
</script>
</body>
</html>
